package com.itheima.dubbo.mysql.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.commons.model.domain.AgeDistribution;
import com.itheima.commons.model.domain.GenderDistribution;
import com.itheima.dubbo.interfaces.AgeDistributionApi;
import com.itheima.dubbo.interfaces.GenderDistributionApi;
import com.itheima.dubbo.mysql.mapper.AgeDistributionMapper;
import com.itheima.dubbo.mysql.mapper.GenderDistributionMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;
import java.util.List;

@Service
public class GenderDistributionImpl implements GenderDistributionApi {

    @Autowired
    private GenderDistributionMapper genderDistributionMapper;

    @Override
    public List<GenderDistribution> query(String startTime, String endTime) {
        List<GenderDistribution> genderDistribution = genderDistributionMapper.query(startTime, endTime);
        return genderDistribution;
    }
}
